from langchain_openai import ChatOpenAI

def qw_model():
    return ChatOpenAI(
        model='qwen-max-0919',
        base_url='https://dashscope.aliyuncs.com/compatible-mode/v1',
        api_key='sk-debee146f82244268914dd2e3d98761b',
        temperature=0.7,
        top_p=0.9
    )

if __name__ == '__main__':
    model = qw_model()
    print(model.invoke('介绍下李白').content)
